package string;

public class StringBuilderDemo {
    public static void main(String[] args) {
        /*
        *StringBuilder提供了用于编辑字符串内容的相关操作，
        * 增：append
        * 删：delete
        * 改：replace
        * 查：insert
         */
        String line = "好好学习Java";
        StringBuilder builder = new StringBuilder(line);
        builder.append("笑");
        builder.delete(8,9);
        builder.replace(5,6,"j");
        builder.insert(0,"要");
        String str = builder.toString();
        System.out.println(str);
    }
}
